import 'package:plugin_platform_interface/plugin_platform_interface.dart';

import 'esc_command.dart';
import 'flutter_k9_method_channel.dart';

abstract class FlutterK9Platform extends PlatformInterface {
  /// Constructs a FlutterK9Platform.
  FlutterK9Platform() : super(token: _token);

  static final Object _token = Object();

  static FlutterK9Platform _instance = MethodChannelFlutterK9();

  /// The default instance of [FlutterK9Platform] to use.
  ///
  /// Defaults to [MethodChannelFlutterK9].
  static FlutterK9Platform get instance => _instance;

  /// Platform-specific implementations should set this with their own
  /// platform-specific class that extends [FlutterK9Platform] when
  /// they register themselves.
  static set instance(FlutterK9Platform instance) {
    PlatformInterface.verifyToken(instance, _token);
    _instance = instance;
  }

  Future<String?> getPlatformVersion() {
    throw UnimplementedError('platformVersion() has not been implemented.');
  }

  Future<bool?> connect() {
    throw UnimplementedError('platformVersion() has not been implemented.');
  }

  Future<bool?> print(List<EscCommand> commands) {
    throw UnimplementedError('platformVersion() has not been implemented.');
  }
}
